{% extends "base_jrcadmin2.html" %}

{% block mainheading %}{{ block.super }} \ List of signal{% endblock %}

{% block object-tools %}

	<ul class="object-tools">
		<li><a href="/portadmin/">Back to CST</a></li>
		<li><a href="/jrcsignal/parse/">Import signals</a></li>
	</ul>

{% endblock %}

{% block content %}

	<table>
		<thead>
			<tr>
				<th>PK</th>
				<th>CST</th>
				<th>Entry date</th>
				<th>Exit date</th>
				<th>&nbsp;</th>
				<th>Entry</th>
				<th>Exit</th>
				<th>&nbsp;</th>
			</tr>
		</thead>
		<tbody>

		{% for s in object_list %}
			<tr class="{% cycle "row1" "row2" %}">
				<td>{{ s.pk }}</td>
				<td>{{ s.cst_id.name }}</td>
				<td>{{ s.date_first|date:"Y-m-d" }}</td>
				<td>{{ s.date_second|date:"Y-m-d" }}</td>
				<td>{{ s.get_direction_first_name }} / {{ s.get_direction_second_name }}</td>
				<td>{{ s.entry_value }}</td>
				<td>{{ s.exit_value }}</td>
				<td>
					<a href="/jrcsignal/{{ s.pk }}/edit/" class="changelink">&nbsp;</a>
					<a href="/jrcsignal/{{ s.pk }}/delete/" class="deletelink">&nbsp;</a>
				</td>
			</tr>

		{% empty %}
			<tr>
				<td colspan="8">No signals!</td>
			</tr>
		{% endfor %}
	
		</tbody>

		<tr>
			<td colspan="8">
				<input type="button" value="Import signals" class="default" onclick="document.location.href='/jrcsignal/parse/'" />
			</td>
		</tr>
	
	</table>

{% endblock %}
